package com.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.model.Emp;/*泛型*/
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmpDao extends BaseMapper<Emp> {
    //...

    //查询员工信息以及部门名称
  //  @Select("SELECT p.*,d.dname FROM emp p LEFT JOIN dept d ON p.deptno=d.deptno")
    public Page<Emp> listPage(Page page);
    //条件和分页查询
    public Page<Emp> listPage(Page page,@Param("emp") Emp emp);

}
